package com.liuli.action;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;

import com.liuli.entity.Category;
import com.liuli.service.CategoryService;
import com.opensymphony.xwork2.ActionSupport;

@Controller
public class CategoryAction extends ActionSupport {
	
	
	@Autowired
	@Qualifier("categoryService")
	private CategoryService categoryService;
	
	
	
	
	private List<Category> list = new ArrayList<Category>();
	
	public String index(){
		System.out.println("index...页面");
		list =categoryService.getCategoryList();
		return SUCCESS;
	}

	public CategoryService getCategoryService() {
		return categoryService;
	}

	public void setCategoryService(CategoryService categoryService) {
		this.categoryService = categoryService;
	}

	public List<Category> getList() {
		return list;
	}

	public void setList(List<Category> list) {
		this.list = list;
	}

	
	
	
}
